/**
 * author:wos
 * time:2024-1-4
 * title:获取用户的信息
 */

async function getRouters(ctx, next) {
    let user = await global.getUser(ctx)
    if (!user) {
        global.goLogin(ctx)
        return false
    }
    global.response(ctx, {
        "status":200,
        "code": 200,
        "data": {
            permissions:user.permissions,
            roles:roles,
            user:user
        },
        "msg":'success'
    })
}
module.exports = getRouters


